Saving current parameters, small bugfixes