tests minor bugs fixing