Fixed lag and small bugs