Bug fixing, added more configuration