fixed null rows handling