Fixed some issues. Freezes randomly.