fixed some loading related issues