Fixed error when placing bed in illegal position