fixed apply function for types with UInt64