Fixed a bug where buttons and inputs did not properly reset when switched to another screen and switched back