Fixed error and added test system