Fix corner cases while adding commands to KGSL ringbuffer