credit system working, fixes #5