prevent saving empty