Fixing child linking. Not complete, but should work.

Signed-off-by: Tushar Narayan <tusharnarayan@gmail.com>