Fixed errors in policy code