fixed issue with active player being NaN