Fixed error and extended tests