Bug fixed in comments, still buggy, needs testing.