Bug Corrections
Final Version after testing