Fixed small API bugs.