generate code for conv if needed
fixed off by one in stack allocation