Fixed undefined options bug