Image data correctly saving to element. Fixes #2.