Fix for last function in tests