added a fix for the reset