capitalize() bug in scripts