Fixed empty values from causing an error