Fixed NullPointerException that happend when everything was empty