fixed init and reset