fixed null exception error