fixed nil to null error