Fixed bug with empty fields