Properly unload hex before compilation and running