Bugfix #1

Fixed bug when trailing value can not be saved
Fixed application dir in Mac OS X