fixing bug in app_conv due to arithmetics