Fixed problems with references to the $options array