Do not use $GLOBALS but $cs_main