Fixed render/cancel/render bug