fixed st_x and st_y, thanks Paolo Valleri