Fix tile size calculations