fix some SQL escape problems
fix on decorations