Change defaultCheck from stack to heap allocated pointer