fix bug

need to check for nulls