fixes callback invocation to adhere to Node.js convention