modified the wrap code a bit to give the profile.js more control, especially when dealing with callback arguments
fix