Fixed bug and updated manual