fix null pointer exception in getProperty