Fixed on load bug