fixed processing bugs