Made some fixes to make the code work with the lates poc version.