Weird behaviour converting velocity to displacement
You have two problems here.

First, as hotpaw2 mentioned, double integration is sensitive to any non-zero bias in your accelerometer, which will certainly be present if you are using a MEMS accelerometer. Suppose you have a bias of $b$; then, your position at time $t$ is 

$$p(t) = \int_0^t \int_0^{t^\prime} b \ dt^{\prime\prime} \  dt^\prime = \frac{b}{2} t^2$$.

So, your position is growing quadratically with time.  Not good!

Another problem will be the measurement noise that is riding on your signal.  Double integration of this noise signal will behave like a second-order random walk and will also cause your position to diverge over time.

A common approach to this sort of problem is to use a Kalman Filter.  Also, this is a good introduction to position estimation using accelerometers.