Using dispatch_once function instead of the static bool values