Fixing count & variable