Fix bug . last tile wrong height or width