Added more parameter options and fixed a small bug.