bug fixed, attribute missed quotes
bug fixed renamed resource
better to check length first, error more readable