fixed name detection of relative assets
Fixed various bugs