fixed bug in compile callbacks that crashed app