Fixed potential memory leak
Added stamina