solving loading bug