Updated fixed bug

Fixed NullPointerException