Fixed #2. Needs to be fixed properly.