Aded test and fixed rules