Merged in derekeder's fix