fixed sergios code so that neural model compilation works (hopefully)