Fix for undefined issue