Fixes for link/1 and demonitor/1