fixed a bug in compilation of function application