Fixes undefined var sprintf missing