Fix for selection using proper SELECT