My guess is that it has something to do with this code:
(Sorry for not knowing for sure...I'm very tired and can barely stay awake :)
; convert pixel positions To tile positions X1 = X / TILESIZE Y1 = Y / TILESIZE X2 = (X + Width) / TILESIZE Y2 = (Y + Height) / TILESIZEMaybe you have to subtract 1/2 tile to compensate for rounding errors?
X1 = X / TILESIZE - .5
(Sorry for not knowing for sure...I'm very tired and can barely stay awake :)