Fixed bug concerning null values.