Added check for headroom in /bed