Fixed bug where pressing an empty field will cause an error