fixed possible npe