Solving small critical error with tests