Fixing outstanding bugs