Fixed: some bugs