fix parent type problem, hope i dont break anything related to the type thing