ref #19
ref #19. replace loadedmetadata to loadeddata
ref #27 ref#28. Hotfixes