fixed weird problem with loading, please consider all the changes