Fix self test functionality