fix getting optional params