Changed assertions for better error messages.