bug fix for checking for non-existant tiles