Fixed bug in automated tests