Homing at different corners

I need a sanity check here. I’m configuring marlin to home to the upper right corner of my workspace.

If I manually trigger the endstop switches (prematurely), things work well. But when I use the 3d printed stops, the motors go crazy (they are stepping indefinately). This is what I have for the config:

#define X_HOME_DIR 1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1

// @section machine
// The size of the printable area
#define X_BED_SIZE 440 // 200
#define Y_BED_SIZE 290 // 200

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -X_BED_SIZE
#define Y_MIN_POS -Y_BED_SIZE
#define Z_MIN_POS 0
#define X_MAX_POS 0
#define Y_MAX_POS 0
#define Z_MAX_POS 200

I have a feeling the travel limits are not defined correctly. Thanks for any help.