Fix corner cases while adding ringbuffer commands in KGSL