Resolving #141
resolving #167 Null Pointer exception when using GUI