deriving next tile bug fixed