Fixed previously introduced SQL bug :)