Fix NullPointerException #40
Update version number to 0.5.2