cleaning up and preventing a crash due to type families