Debugged a bit