fix parent creating logic