Fixed minor problems

Ready to submit