Fix Application class constructor to avoid startup segmentation fault.