Fixed malfunctioning tests