quick fix, exception handling