fixed bug when input was bed