Removed buggs from Master code