Avoid initial GUI error and consider potential energy