Re-added fix to player by replacing switch with if constructor.