fixed space and replacement bugs and randomize div showing up early