fixed bug: cancel had the same behaviour as save