Fix canvas size and item collision issue