Fixed Minor Code Issues