Cleaned the code a bit, the default behavior shoud not be a crash.