fixed some stuff with heredocs