added return when error appear