Added test, and fixed documentation bug