Fixed bugs in network stack constructor for accepting callback dict.