Document ready fix