fix getScheme() behavior for no arguments and out of bounds arguments