Added the c code for the workaround