Fixed cache generation problems

Fuck numbers (mason from Bo anyone? :P)
TODO: Fix client halted on cache download.