Fix :: Sql problem on resource table