fixing some exceptions through null check
maybe fixing some loading