fixed the get/set mode functions