fixed all self test stuff