added checks for drawing at right end of habitat bars