Changed conditional for selected to ===