Removed unnecessary use of reflection.