Fix foreign calls