fixed null input/reset errors