fixed null typing error