Corrected raf error on load
Bug fixes on resize and load