proper saving fix by calling sync() method

Issue: #91