Changed initialization order to prevent errors