fixed bugs with empty field