fixed reset fields to check if data is available before manipulation