fixed projection code to handle an empty room