resolve of issue #34 and small fix terrainhandler