Fixed some fpm bugs, beggining to write the shim