Bug fix for 0.6

Fixed the NullPointerException for 0.6