corrected an null pointer exception in lines