fixed chapel null pointer exception